﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.Serialization;
using System.Text;
using NyBio.Model;
using NyBio.DB;

namespace NyBio.Ctrl
{
    public class RoomCtrl
    {
        private RoomDB roomDB;

        public RoomCtrl()
        {
            roomDB = new RoomDB();
        }

        public List<Room> getRooms()
        {
            return roomDB.getRooms();
        }

        public Room getRoomById(int id)
        {
            return roomDB.getRoomById(id);
        }

        public void insertRoom(Room room)
        {
            roomDB.insertRoom(room);
        }

        public Room getLatestRoom()
        {

            return roomDB.getLatestRoom();
        }

        public List<Room> getRoomSearch(string name)
        {
            return roomDB.getRoomSearch(name);
        }
    }
}